import request from '@/utils/request'

// 查询故障申报列表
export function listDeclare(query) {
  return request({
    url: '/operationalsystem/declare/list',
    method: 'get',
    params: query
  })
}

// 查询故障申报详细
export function getDeclare(id) {
  return request({
    url: '/operationalsystem/declare/' + id,
    method: 'get'
  })
}

// 新增故障申报
export function addDeclare(data) {
  return request({
    url: '/operationalsystem/declare',
    method: 'post',
    data: data
  })
}

// 修改故障申报
export function updateDeclare(data) {
  return request({
    url: '/operationalsystem/declare',
    method: 'put',
    data: data
  })
}

// 删除故障申报
export function delDeclare(id) {
  return request({
    url: '/operationalsystem/declare/' + id,
    method: 'delete'
  })
}

// 导出故障申报
export function exportDeclare(query) {
  return request({
    url: '/operationalsystem/declare/export',
    method: 'get',
    params: query
  })
}